package com.woniuxy.controller;

import com.woniuxy.entity.Product;
import com.woniuxy.sender.ProductSender;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: 曾令忠
 * @Description:
 * @Date: 2020/7/6 0006-上午 10:34
 */
@RestController
@RequestMapping("/product")
public class ProductController {
    @Autowired
    ProductSender productSender;

    @RequestMapping("/find")
    public Product find(int pid){
        productSender.send(pid);
        return null;
    }


}
